<template>
	<view class="familyMember">
		  <uni-nav-bar left-icon="back" @clickRight="addhouse" @clickLeft="back" left-text="返回" title="家庭成员" >
				<view slot="right">添加</view>
		  </uni-nav-bar>
		  <text class="message">信息修改请与社区管理员联系</text>
		  
		  <view class="element" v-for="(item,index) in userinfoLlists">
		  	<view class="head">
				{{item.usernative}}
			</view>
			<view class="contents">
				<view class="content">
					<text>姓名</text>
					<text>{{item.name}}</text>
				</view>
				<view class="content">
					<text>性别</text>
					<text>{{item.sex===1 ?'男' :'女'}}</text>
				</view>
				<view class="content">
					<text>电话</text>
					<text>{{item.mobile}}</text>
				</view>
				<view class="content">
					<text>身份证号</text>
					<text>{{item.cardid}}</text>
				</view>
				<view class="content">
					<text>住户类型</text>
					<text>{{item.usertypeName}}</text>
				</view>
			</view>
			<view class="bottom">
				<text>2021-3-15 12:08</text>
				<text class="Authentication">{{item.stateName}}</text>
			</view>
		  </view>
		  
	</view>
</template>

<script>
	import {userinfoLlist} from '../../api/MyHouse.js' // 我的家庭成员接口
	export default{
		data(){
			return{
				userinfoLlists:[]
			}
		},
		onLoad(){
				this.familyMember() 
		},
		methods:{	
			back(){
				uni.navigateBack({
					delta:1
				})
			},
			addhouse(){
				uni.navigateTo({
					url:'../houses/housesCheck'
				})
			},
			// 渲染我的家庭成员列表
			async familyMember(){
				let res = await userinfoLlist()
				console.log(res)
				if(res.errCode == '10000'){
					this.userinfoLlists = res.data.list
				}
				console.log(this.userinfoLlists)
			},
			 
		},
		
	}
</script>

<style lang="less">
	@import './../../static/style/familyMember.less';
</style>
